<template>
		<view class="box">
			{{data}}
			<view :class="aa">v-bind</view>
			<view>{{flag?111:222}}</view>
			<button type="default" @click="hanleClick(20,$event)">点我</button>
		</view>
</template>

<script>
	export default {
		data() {
			return {
				data:"这里是data里面的数据",
				aa:'a1',
				flag:true
			}
		},
		methods: {
			hanleClick(num,e){
				console.log(num,e);
			}
		},
		onLoad() {
			console.log('onload监听组件首次加载');
		},
		onShow() {
			console.log('onshow监听组件每次显示');
		},
		onReady() {
			console.log('监听页面首次渲染完成');
		},
		onHide() {
			console.log('监听组件每次隐藏');
		},
		onUnload() {
			console.log('监听组件卸载');
		}
	}
</script>

<style>
	@import url("demo.css");
	.box{
		color:green;
	}
	.a1{
		color: red;
	}
</style>
